package com.qc.entity;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import com.qc.common.DateUtil;

public class SecScheduleCommentEntity extends BaseEntity {

	protected long scId;
	protected long secScheduleId;
	protected long userId;
	protected String ucContent;
	protected String createdTime;
	
	protected String avatar;//用户头像
	protected String nickname;//用户昵称
	//返回到客户端
	protected List<SecScheduleReplyCommentEntity> list;
	
	public static SecScheduleCommentEntity getInstance(ResultSet rs) throws SQLException {
		SecScheduleCommentEntity entity = new SecScheduleCommentEntity();
		entity.setScId(rs.getLong("sc_id"));
		entity.setSecScheduleId(rs.getLong("sec_schedule_id"));
		entity.setUserId(rs.getLong("user_id"));
		entity.setUcContent(rs.getString("uc_content"));
		entity.setCreatedTime(DateUtil.timestampParseString(rs.getTimestamp("created_time")));
		entity.setAvatar(rs.getString("avatar"));
		entity.setNickname(rs.getString("nickname"));
		return entity;
	}
	
	public long getScId() {
		return scId;
	}
	public void setScId(long scId) {
		this.scId = scId;
	}
	public long getSecScheduleId() {
		return secScheduleId;
	}
	public void setSecScheduleId(long secScheduleId) {
		this.secScheduleId = secScheduleId;
	}
	public long getUserId() {
		return userId;
	}
	public void setUserId(long userId) {
		this.userId = userId;
	}
	public String getUcContent() {
		return ucContent;
	}
	public void setUcContent(String ucContent) {
		this.ucContent = ucContent;
	}
	public String getCreatedTime() {
		return createdTime;
	}
	public void setCreatedTime(String createdTime) {
		this.createdTime = createdTime;
	}
	public List<SecScheduleReplyCommentEntity> getList() {
		return list;
	}
	public void setList(List<SecScheduleReplyCommentEntity> list) {
		this.list = list;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
	
}
